home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
fax
/
src
/
etc
/
dialrules
< prev
next >
Wrap
Text File
|
1994-08-01
|
2KB
|
47 lines
! $Header: /usr/people/sam/fax/etc/RCS/dialrules,v 1.2 1993/05/06 11:34:09 sam Rel $
!
! FlexFAX Dialing String Processing Rules.
!
! This file describes how to process user-specified dialing strings
! to create two items:
!
! CanonicalNumber: a unique string that is derived from all dialing
! strings to the same destination phone number. This string is used
! by the fax server for ``naming'' the destination.
!
! DialString: the string passed to the modem for use in dialing the
! telephone. This string should be void of any characters that might
! confuse the modem.
!
Area=${AreaCode} ! local area code
Country=${CountryCode} ! local country code
IDPrefix=${InternationalPrefix} ! prefix for placing an international call
LDPrefix=${LongDistancePrefix} ! prefix for placing a long distance call
!
WS=" " ! our notion of white space
!
! Convert a phone number to a canonical format:
!
! +<country><areacode><rest>
!
! by (possibly) stripping off leading dialing prefixes for
! long distance and/or international dialing.
!
CanonicalNumber := [
#.* = ! strip calling card stuff
[^+0-9]+ = ! strip white space etc.
^${IDPrefix} = + ! replace int. dialing code
^${LDPrefix} = +${Country} ! replace l.d. dialing code
^[^+] = +${Country}${Area}& ! otherwise, insert canon form
]
!
! Process a dialing string according to local requirements.
! These rules do only one transformation: they convert in-country
! international calls to long-distance calls.
!
DialString := [
[-${WS}.]+ = ! strip syntactic sugar
^[+]${Country} = ${LDPrefix} ! long distance call
^[+] = ${IDPrefix} ! international call
]